<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<script>
$(function() {
    var entityManagement = new EntityManagement();
    entityManagement.entityName = "预约上下线";
    entityManagement.entityPath = "/reservation/reservation";
    entityManagement.entityTable = "reservationTable";
    entityManagement.add = function (com, grid) {
        return top.qBox.iFLoad({title:'新增' + entityManagement.entityName, src:ctx + entityManagement.entityPath + "/input.action?fatherId=${param.id}", afterHide:entityManagement.refresh});
    }
    $("#" + entityManagement.entityTable).flexigrid({
        url : "/epg-web" + entityManagement.entityPath + "/list.action",
        //url : "list.action",
        dataType : 'json',
        <c:if test="${param.id > 0}">
        params:[{"name":"filter_EQL_fatherId", value:${param.id}}],
        </c:if>
        colModel : [
            {display: 'id', name : 'id', width : 70, sortable : false, align: 'center', hide : false},
            {display: 'type', name : 'type', width : 70, sortable : false, align: 'center', hide : false},
            {display: '频道', name : 'fatherId', width : 90, sortable : false, align: 'center', hide : false},
            {display: '平台', name : 'platform', width : 120, sortable : false, align : 'center'},
            {display: '开始时间', name : 'startTime', width : 120, sortable : false, align : 'center'},
            {display: '结束时间', name : 'endTime', width : 120, sortable : false, align : 'center'},
            {display: '直播延时', name : 'delayTime', width : 70, sortable : false, align : 'center'},
            {display: '地区黑名单/频道名', name : 'blacklist', width : 120, sortable : false, align : 'center'},
            {display: '上下线状态', name : 'opsStatus', width : 70, sortable : false, align : 'center'},
            {display: '备注', name : 'reason', width : 70, sortable : false, align : 'center'},
            {display: '状态', name : 'status', width : 70, sortable : false, align : 'center'},
            {display: '添加时间', name : 'addTime', width : 120, sortable : false, align : 'center'},
            {display: '更新时间', name : 'updateTime', width : 120, sortable : false, align : 'center'}
        ],
        height: document.documentElement.clientHeight - 128,
        sortorder : "desc",
        rp : 24,
        rpOptions : [24, 40, 80, 100, 200],
        buttons : [
            {name : '新增', bclass : 'add', onpress : entityManagement.add},
            {separator : true},
            {name : '删除', bclass : 'delete', onpress : entityManagement.confirmDel},
            {separator : true}
        ]
    });
});
</script>